package com.ushine.web.component.design.chain.salary.handler;

import com.ushine.web.component.design.chain.salary.StaffEnum;
import com.ushine.web.component.design.chain.salary.config.AbstractSalaryCalculateHandler;
import com.ushine.web.component.design.chain.salary.model.SalaryCalculateBO;
import com.ushine.web.component.http.HttpResponseVO;
import org.springframework.stereotype.Service;

/**
 * @Author: yls
 * @Date: 2022/03/04 10:54
 * @Description: 薪资计算的数据准备工作
 * @Version 1.0
 */
@Service
public class SalaryPrepareHandler extends AbstractSalaryCalculateHandler {
    @Override
    protected HttpResponseVO<?> process(SalaryCalculateBO salaryCalculate) {
        /*
         * 查询具体的薪资详情数据：
         *  是否实习生
         *  是否离职
         *  是否当月入职
         *  是否补发上月薪资
         *  员工类型（提供给策略模式用）
         */
        salaryCalculate.setStaffEnum(StaffEnum.NORMAL_STAFF);
        return new HttpResponseVO<>().ok("数据准备完成！",salaryCalculate);
    }
}
